package Builder.tow;

/**
 * @ProjectName: 23种设计模式
 * @Package: Builder
 * @ClassName: ComplexTerrainBilder
 * @Author: renhan
 * @Description:
 * @Date: 2020/11/19 10:14
 * @Version: 1.0
 */
public class ComplexTerrainBilder implements TerrainBuilder {
    Terrain terrain = new Terrain();

    @Override
    public TerrainBuilder buildWall() {
        terrain.w = new Wall(10, 10, 50, 50);
        return this;
    }

    @Override
    public TerrainBuilder buildFort() {
        terrain.f = new Fort(10, 10, 50, 50);
        return this;
    }

    @Override
    public TerrainBuilder buildMine() {
        terrain.m = new Mine(10, 10, 50, 50);
        return this;
    }

    @Override
    public Terrain build() {
        return terrain;
    }
}
